﻿#if NLog
using System;

namespace Cat.Core.XLog.NLog
{
    partial class NLogger
    {
        public void D(object message) { if (_log.IsDebugEnabled) { Exception exc = message as Exception; if (exc != null) _log.Debug(exc, _logStringFormator.DoFormat(exc.Message).Value); else _log.Debug(_logStringFormator.DoFormat(message).Value); } }
        public void D(string format, object arg0) { if (_log.IsDebugEnabled) _log.Debug(_logStringFormator.DoFormat(format, arg0).Value); }
        public void D(string format, object arg0, object arg1) { if (_log.IsDebugEnabled) _log.Debug(_logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void D(string format, object arg0, object arg1, object arg2) { if (_log.IsDebugEnabled) _log.Debug(_logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void D(string format, params object[] args) { if (_log.IsDebugEnabled) _log.Debug(_logStringFormator.DoFormat(format, args).Value); }
        public void D(Exception exception, object message) { if (_log.IsDebugEnabled) _log.Debug(exception, _logStringFormator.DoFormat(message).Value); }
        public void D(Exception exception, string format, object arg0) { if (_log.IsDebugEnabled) _log.Debug(exception, _logStringFormator.DoFormat(format, arg0).Value); }
        public void D(Exception exception, string format, object arg0, object arg1) { if (_log.IsDebugEnabled) _log.Debug(exception, _logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void D(Exception exception, string format, object arg0, object arg1, object arg2) { if (_log.IsDebugEnabled) _log.Debug(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void D(Exception exception, string format, params object[] args) { if (_log.IsDebugEnabled) _log.Debug(exception, _logStringFormator.DoFormat(format, args).Value); }

        public void I(object message) { if (_log.IsInfoEnabled) { Exception exc = message as Exception; if (exc != null) _log.Info(exc, _logStringFormator.DoFormat(exc.Message).Value); else _log.Info(_logStringFormator.DoFormat(message).Value); } }
        public void I(string format, object arg0) { if (_log.IsInfoEnabled) _log.Info(_logStringFormator.DoFormat(format, arg0).Value); }
        public void I(string format, object arg0, object arg1) { if (_log.IsInfoEnabled) _log.Info(_logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void I(string format, object arg0, object arg1, object arg2) { if (_log.IsInfoEnabled) _log.Info(_logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void I(string format, params object[] args) { if (_log.IsInfoEnabled) _log.Info(_logStringFormator.DoFormat(format, args).Value); }
        public void I(Exception exception, object message) { if (_log.IsInfoEnabled) _log.Info(exception, _logStringFormator.DoFormat(message).Value); }
        public void I(Exception exception, string format, object arg0) { if (_log.IsInfoEnabled) _log.Info(exception, _logStringFormator.DoFormat(format, arg0).Value); }
        public void I(Exception exception, string format, object arg0, object arg1) { if (_log.IsInfoEnabled) _log.Info(exception, _logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void I(Exception exception, string format, object arg0, object arg1, object arg2) { if (_log.IsInfoEnabled) _log.Info(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void I(Exception exception, string format, params object[] args) { if (_log.IsInfoEnabled) _log.Info(exception, _logStringFormator.DoFormat(format, args).Value); }

        public void W(object message) { if (_log.IsWarnEnabled) { Exception exc = message as Exception; if (exc != null) _log.Warn(exc, _logStringFormator.DoFormat(exc.Message).Value); else _log.Warn(_logStringFormator.DoFormat(message).Value); } }
        public void W(string format, object arg0) { if (_log.IsWarnEnabled) _log.Warn(_logStringFormator.DoFormat(format, arg0).Value); }
        public void W(string format, object arg0, object arg1) { if (_log.IsWarnEnabled) _log.Warn(_logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void W(string format, object arg0, object arg1, object arg2) { if (_log.IsWarnEnabled) _log.Warn(_logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void W(string format, params object[] args) { if (_log.IsWarnEnabled) _log.Warn(_logStringFormator.DoFormat(format, args).Value); }
        public void W(Exception exception, object message) { if (_log.IsWarnEnabled) _log.Warn(exception, _logStringFormator.DoFormat(message).Value); }
        public void W(Exception exception, string format, object arg0) { if (_log.IsWarnEnabled) _log.Warn(exception, _logStringFormator.DoFormat(format, arg0).Value); }
        public void W(Exception exception, string format, object arg0, object arg1) { if (_log.IsWarnEnabled) _log.Warn(exception, _logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void W(Exception exception, string format, object arg0, object arg1, object arg2) { if (_log.IsWarnEnabled) _log.Warn(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void W(Exception exception, string format, params object[] args) { if (_log.IsWarnEnabled) _log.Warn(exception, _logStringFormator.DoFormat(format, args).Value); }

        public void E(object message) { if (_log.IsErrorEnabled) { Exception exc = message as Exception; if (exc != null) _log.Error(exc, _logStringFormator.DoFormat(exc.Message).Value); else _log.Error(_logStringFormator.DoFormat(message).Value); } }
        public void E(string format, object arg0) { if (_log.IsErrorEnabled) _log.Error(_logStringFormator.DoFormat(format, arg0).Value); }
        public void E(string format, object arg0, object arg1) { if (_log.IsErrorEnabled) _log.Error(_logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void E(string format, object arg0, object arg1, object arg2) { if (_log.IsErrorEnabled) _log.Error(_logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void E(string format, params object[] args) { if (_log.IsErrorEnabled) _log.Error(_logStringFormator.DoFormat(format, args).Value); }
        public void E(Exception exception, object message) { if (_log.IsErrorEnabled) _log.Error(exception, _logStringFormator.DoFormat(message).Value); }
        public void E(Exception exception, string format, object arg0) { if (_log.IsErrorEnabled) _log.Error(exception, _logStringFormator.DoFormat(format, arg0).Value); }
        public void E(Exception exception, string format, object arg0, object arg1) { if (_log.IsErrorEnabled) _log.Error(exception, _logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void E(Exception exception, string format, object arg0, object arg1, object arg2) { if (_log.IsErrorEnabled) _log.Error(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void E(Exception exception, string format, params object[] args) { if (_log.IsErrorEnabled) _log.Error(exception, _logStringFormator.DoFormat(format, args).Value); }

        public void F(object message) { if (_log.IsFatalEnabled) { Exception exc = message as Exception; if (exc != null) _log.Fatal(exc, _logStringFormator.DoFormat(exc.Message).Value); else _log.Fatal(_logStringFormator.DoFormat(message).Value); } }
        public void F(string format, object arg0) { if (_log.IsFatalEnabled) _log.Fatal(_logStringFormator.DoFormat(format, arg0).Value); }
        public void F(string format, object arg0, object arg1) { if (_log.IsFatalEnabled) _log.Fatal(_logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void F(string format, object arg0, object arg1, object arg2) { if (_log.IsFatalEnabled) _log.Fatal(_logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void F(string format, params object[] args) { if (_log.IsFatalEnabled) _log.Fatal(_logStringFormator.DoFormat(format, args).Value); }
        public void F(Exception exception, object message) { if (_log.IsFatalEnabled) _log.Fatal(exception, _logStringFormator.DoFormat(message).Value); }
        public void F(Exception exception, string format, object arg0) { if (_log.IsFatalEnabled) _log.Fatal(exception, _logStringFormator.DoFormat(format, arg0).Value); }
        public void F(Exception exception, string format, object arg0, object arg1) { if (_log.IsFatalEnabled) _log.Fatal(exception, _logStringFormator.DoFormat(format, arg0, arg1).Value); }
        public void F(Exception exception, string format, object arg0, object arg1, object arg2) { if (_log.IsFatalEnabled) _log.Fatal(exception, _logStringFormator.DoFormat(format, arg0, arg1, arg2).Value); }
        public void F(Exception exception, string format, params object[] args) { if (_log.IsFatalEnabled) _log.Fatal(exception, _logStringFormator.DoFormat(format, args).Value); }

    }
}
#endif
